Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum


  

PreviousPrevious NextNext


~Joan Froweploponi 27.Dec.03 05:45 AM a Web browser
Domino Web Access All Releases All Platforms


I'm Having trouble detaching a file from an RTF. Here's my code...

Although I have the _inputFileName identified as a String above, and have it in the field called FileName, I'm still getting FileName: Null through my debug lines.

void detachFile() {
String _inputFileName = ""; // gwl a
try {

boolean saveFlag = false;
_inputFileName = thisDoc.getItemValueString("FileName");
RichTextItem body = (RichTextItem)thisDoc.getFirstItem("$File");

if (trace) System.out.println("Item name: " +body.getName());

Vector v = body.getEmbeddedObjects();
Enumeration e = v.elements();
while (e.hasMoreElements()) {
EmbeddedObject eo = (EmbeddedObject)e.nextElement();
if (eo.getType() == EmbeddedObject.EMBED_ATTACHMENT) {
eo.extractFile( _inputFileName );

// now we'll remove the file from the Notes Document...
eo.remove();
saveFlag = true;
}

if (saveFlag) {
thisDoc.save(true, true);
saveFlag = false;
}
}
} catch(NotesException e) {
System.out.println(e.id + " " + e.text);
e.printStackTrace();

}catch(Exception e) {
e.printStackTrace();
}
} //detachFile()

I pretty much took this from the help file. Can someone help me get this working? I also have to understand exactly where the server puts this file when we detach it. Is it in the folder (directory) that the NSF is in?

Help!

Marcus






detaching an uploaded file on serve... (~Joan Froweplop... 27.Dec.03)
. . RE: detaching an uploaded file on s... (~Nicole Fezweso... 29.Dec.03)





  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Category
Platform
Release
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS